package main;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

import utils.IOUtils;

public class SeriesRunner {

	public static void main(String[] args) throws IOException {
		new File("./Lefel_Zilberman").mkdir();

		File dir = new File("instances");
		File[] listFiles = dir.listFiles();
		File logFile = new File("Lefel_Zilberman/satLogger.csv");
		FileWriter fw = new FileWriter(logFile);
		fw.write("Instance#,#Nodes,EncodingTime,#Clause,#Variable,SATSolvingTime,SolutionSize,OptimalSize" + IOUtils.lineSeperator);
		fw.flush();
		
		for (File file : listFiles) {
			Main.run(file.getCanonicalPath(),fw);
		}
		fw.close();
		
	}
}
